# Author:Zhang Yu

class Classdemo():
    """
    这里描述类的内容
    """
    name = None
    data = {}
    def __init__(self):
        data = {}
    def __getitem__(self, item):
        print("__getitem__",item)
        return  self.data

    def __setitem__(self, key, value):
        print("__setitem__", key,value)
        self.data[key] = value

    def __call__(self, *args, **kwargs):
        print("Call",*args, **kwargs)
    def __str__(self):
        return "STRtest"

def teshu(self):
    # 一个特殊的方法
    print("teshu")

if __name__ == '__main__':
    C = Classdemo()
    # print(C.__module__)
    # print(C.__doc__) # 描述
    # print(Classdemo.__dict__) # 类的所有信息
    # print(C)
    # C["name"] = "zhangyu"
    # print(C["name"])
    Foo = type("Classdemo",(),{'func':teshu})
    f=Foo()
    f.func()
